package com.esunrise.shop.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.esunrise.shop.common.entity.SysAdmin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysAdminMapper extends BaseMapper<SysAdmin> {
    List<SysAdmin> findAll();

    int insertOld(@Param("name") String name, @Param("password") String password,
                  @Param("email") String email, @Param("mark") int mark);

    SysAdmin selectByEmail(String email);

    SysAdmin getAdminInfo(String email);

    int deleteByIdOld(int id);

    int updateMark(int mark,String email);

    int updateMarkById(int id,int mark);

    int updateOld(String name, String password, String email);
}
